<%@ page import="com.wzy.Jdbc封装.pojo.News_detail" %><%--
  Created by IntelliJ IDEA.
  User: aiwzy
  Date: 2022/4/11
  Time: 15:20
  To change this template use File | Settings | File Templates.
--%>
<jsp:useBean id="detail" class="com.wzy.level.detail.detailServiceImpl.detailServiceImpl" />
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<html>
<head>
    <title>Title</title>
</head>
<%
    News_detail news_detail1 = detail.selectById(1);
    request.setAttribute("news_detail1",news_detail1);

    News_detail news_detail2 = detail.selectById(2);
    session.setAttribute("news_detail2",news_detail2);

    News_detail news_detail3 = detail.selectById(11);
    application.setAttribute("news_detail3",news_detail3);

    News_detail news_detail4 = detail.selectById(19);
    application.setAttribute("news_detail4",news_detail4);

    int[] nums={1,2,3,4,5,6,7,8,9,10};
    session.setAttribute("nums",nums);

%>
<body>
<table>
<%--    <c:forEach items="i"></c:forEach>--%>
    <tr>
        <td>
            <c:out value="${news_detail1.id}"></c:out>

        </td>
        <td> <c:out value="${news_detail1.id}"></c:out></td>
        <td> <c:out value="${news_detail1.categoryId}"></c:out></td>
        <td> <c:out value="${news_detail1.title}"></c:out></td>
        <td> <c:out value="${news_detail1.content}"></c:out></td>
        <td> <c:out value="${news_detail1.summary}"></c:out></td>
        <td> <c:out value="${news_detail1.author}"></c:out></td>
        <td> <c:out value="${news_detail1.picPath}"></c:out></td>
    </tr><tr>
        <td>
            <c:out value="${news_detail2.id}"></c:out>

        </td>
        <td> <c:out value="${news_detail2.id}"></c:out></td>
        <td> <c:out value="${news_detail2.categoryId}"></c:out></td>
        <td> <c:out value="${news_detail2.title}"></c:out></td>
        <td> <c:out value="${news_detail2.content}"></c:out></td>
        <td> <c:out value="${news_detail2.summary}"></c:out></td>
        <td> <c:out value="${news_detail2.author}"></c:out></td>
        <td> <c:out value="${news_detail2.picPath}"></c:out></td>
    </tr><tr>
        <td>
            <c:out value="${news_detail1.id}"></c:out>

        </td>
        <td> <c:out value="${news_detail1.id}"></c:out></td>
        <td> <c:out value="${news_detail1.categoryId}"></c:out></td>
        <td> <c:out value="${news_detail1.title}"></c:out></td>
        <td> <c:out value="${news_detail1.content}"></c:out></td>
        <td> <c:out value="${news_detail1.summary}"></c:out></td>
        <td> <c:out value="${news_detail1.author}"></c:out></td>
        <td> <c:out value="${news_detail1.picPath}"></c:out></td>
    </tr><tr>
        <td>
            <c:out value="${news_detail1.id}"></c:out>

        </td>
        <td> <c:out value="${news_detail1.id}"></c:out></td>
        <td> <c:out value="${news_detail1.categoryId}"></c:out></td>
        <td> <c:out value="${news_detail1.title}"></c:out></td>
        <td> <c:out value="${news_detail1.content}"></c:out></td>
        <td> <c:out value="${news_detail1.summary}"></c:out></td>
        <td> <c:out value="${news_detail1.author}"></c:out></td>
        <td> <c:out value="${news_detail1.picPath}"></c:out></td>
    </tr>


</table>
<h1>${(nums[0] lt nums[8])}</h1>
<h1>${empty nums[10]}</h1>
<h1>${ nums[10]}</h1>

<h1>${nums[3] le nums[9] || nums[3] ge nums[1] ? "真":"假"}</h1>
<h1>${nums[3] ge nums[9] && nums[3] ge nums[1] ? "真":"假"}</h1>
<h1>${nums[3] + nums[9] }</h1>
<h1>${nums[3] - nums[9] }</h1>
<h1>${nums[3] * nums[9] }</h1>
<h1>${nums[3] / nums[9] }</h1>
<h1>${nums[3] % nums[9] }</h1>
<h1>${!(nums[3] ge nums[9]) ? "取反成功":"取反失败" }</h1>
<hr/>
<c:set scope="request" var="name" value="张三"></c:set>
<c:out value="${name}"></c:out>

<c:set target="${news_detail3}" property="title" value="今日大放送aaaaa" ></c:set>
<c:out value="${news_detail3.title}"></c:out>

<c:forEach var="i" items="${nums}" varStatus="id"  >
    <input type="text" value="${nums[i-1]}">
</c:forEach>
</body>
</html>
